#include <stdio.h>
int main(void)
{
	/**
 	* 打开一个输入流
 	* 就和打开的文件关联起来
	*/
	FILE *fp = fopen("/etc/passwd","r");
	if(fp == NULL)
	{
		printf("open file fail\n");
		return 1;
	}
	printf("open file successfully\n");
	int position = ftell(fp);
	if(position == -1)
	{
		printf("ftell fail\n");
		return 1;
	}
	printf("ftell successfully;ftell(fp) = %d\n",position);
	if(fclose(fp) == -1)
	{
		printf("fclose fail\n");
		return 1;
	}
	printf("fclose successfully\n");
}
